/**
 * Copyright 2002 Cordys R&D B.V. 
 * 
 * This file is part of the Cordys .NET Connector. 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#if !defined(AFX_PARAMETERS_H__INCLUDED_)
#define AFX_PARAMETERS_H__INCLUDED_


#pragma once
#include "stdafx.h"


//@Author	: Lejil 
//@Class	: Parameters
//
//		 Arguments required for calling the .NET method,using the Reflection.
//
__gc class Parameters
{
	public :
			/**
			 *	destructor,  release all the resources
			 */
			~Parameters()
			{
				 assemblyName		=	NULL;
				 methodName			=	NULL;
				 inout				=	NULL;
				 mtdParamTypeNode	=	NULL;
				 mtdParamDataNode	=	NULL;
				
				 if ( methodArgument != NULL )
					delete[] methodArgument;
				
			}
			
			//
			// Returns the Assembly Name
			//
			__property String * get_Assembly()
			{
				return assemblyName;
			}
			
			//
			// Returns the class Name
			//
			__property String * get_Class()
			{
				return  Node::GetData(classNode); 
			}

			//
			//	Return  the Method Name
			//
			__property String * get_Method()
			{
				return  methodName;
			}
			

			//
			// Return the Method Arugement Object
			//		Retruns an Object Array, after parsing each value
			//
			__property Object __gc*  get_Mtd_Arguments()[]
			{
				return methodArgument;
			}

			
			//
			// Method Return Type is  XML NOM pointer or NOT
			//
			__property bool get_IsNomPointer()
			{
				return  Node::GetAttribute(methodNode,"ct","false")->Equals("elements");
			}
			
			//	 Return the dataType Node of the method Paramters	       
			//		<parmeters>
			//			</param1 dt="int">
			//		</parmeters>
			__property int get_ParameterTypeNode()
			{
				return  mtdParamTypeNode;
			
			}

			//	
			//	Return the Method Parameter data Node
         	//			<param1>ParamValue</param1>
			//			<param2>ParamValue</param2>
			//
			__property int get_ParameterDataNode()
			{
				return mtdParamDataNode;
			}
			
			//	Return the class Node
			//
			//<class>ClassName</class>
			//
			__property int get_ClassNode()
			{
				return classNode;
			}

			//	Determine the type of the operation, That is 
			//              Instance, Static or Metadata
			//
			//	***		static  	= 0x01;
			//			instance	= 0x02;
			//			metadata	= 0x03;	***
			__property int get_OpType()
			{
				return operation;
			}
			
			
			//
			//	Return the Request pointer Node
			//		
			//
			__property int get_Request()
			{
				return requestNode;
			}



		

protected:

		Object __gc * methodArgument[];	
		
		String * assemblyName;
		String * methodName;
		String * inout;
		
		int classNode;
		int methodNode;
		int operation ;
		int mtdParamTypeNode;
		int mtdParamDataNode;
		int requestNode;

};
#endif